# Prepare to build
SRCDIR=src/

SOURCES=$(wildcard $(SRCDIR)*.c*)
OBJECTS=$(SOURCES:.c*=.o)
BIN=vn100_test

MAKE=g++ -pthread -lrt
LINK=g++ -c -Wall -pthread -lrt

# Make and link the object files
all: $(SOURCES) $(BIN)

# Make the object files
$(BIN): $(OBJECTS)
	$(MAKE) $(OBJECTS) -o $@

# Link the objects files
.cpp.o:
	$(LINK) $< -o $@

# Clean object files
clean:
	rm -rf $(SRCDIR)*.o
